package com.bluebench.bigul.domain;

public enum ElementType {
	
	GLOBAL("global"),
	ELEMENT("element"),
	ATTRIBUTE("attribute"),
	PARAMETER("param"),
	INVOCATION("invoke"),
	DEFAULT("default"),
	COLLECTION("collection"),
	INVALID("invalid"); 
	
	private String name;
	
	private ElementType(String name) {
		this.name = name;
	}
	
	public static ElementType getType(String name){
		if(name.equalsIgnoreCase("global")){
		  return GLOBAL;	
		}else if(name.equalsIgnoreCase("attribute")){
			return ATTRIBUTE;
		}else if(name.equalsIgnoreCase("param")){
			return PARAMETER;
		}else if(name.equalsIgnoreCase("invoke")){
			return INVOCATION;
		}else if(name.equalsIgnoreCase("default")){
			return DEFAULT;
		}else if(name.equalsIgnoreCase("collection")){
			return COLLECTION;
		}else{
		  return ELEMENT;	
		}
		
	}
}
